﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace TPCN.DAL
{
   public class WebLinkObj
    {
        private string _WebLinkID;

        public string WebLinkID
        {
            get { return _WebLinkID; }
            set { _WebLinkID = value; }
        }
        private string _Name;

        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
        private string _Link;

        public string Link
        {
            get { return _Link; }
            set { _Link = value; }
        }
        private string _Order;

        public string Order
        {
            get { return _Order; }
            set { _Order = value; }
        }
        private string _Active;

        public string Active
        {
            get { return _Active; }
            set { _Active = value; }
        }
        public WebLinkObj SetValuesFromDataReader(IDataReader reader)
        {
            WebLinkObj obj = new WebLinkObj();
            obj.WebLinkID = (reader["WebLinkID"] is DBNull) ? String.Empty : reader["WebLinkID"].ToString();
            obj.Name = (reader["Name"] is DBNull) ? String.Empty : reader["Name"].ToString();
            obj.Link = (reader["Link"] is DBNull) ? String.Empty : reader["Link"].ToString();
            obj.Order = (reader["Order"] is DBNull) ? String.Empty : reader["Order"].ToString();
            obj.Active = (reader["Active"] is DBNull) ? String.Empty : reader["Active"].ToString();
           return obj;
        }

    }
}
